package com.iscreen.utils.db.connection.settings;

import com.iscreen.utils.settings.Settings;

public class DBConnectionSettings extends Settings
{

	private final static String ENTRY_DRIVER = "DB_DRIVER";
	private final static String ENTRY_HOST = "DB_HOST";
	private final static String ENTRY_PORT = "DB_PORT";
	private final static String ENTRY_DB_NAME = "DB_NAME";
	private final static String ENTRY_USERNAME = "DB_USERNAME";
	private final static String ENTRY_PASSWORD = "DB_PASSWORD";

	private String driver;
	private String host;
	private String port;
	private String dbName;
	private String username;
	private String password;

	public DBConnectionSettings(String dbPropertiesFileName)
	{
		super(dbPropertiesFileName);
	}

	@Override
	protected void initSettings()
	{
		driver = properties.getProperty(ENTRY_DRIVER);
		host = properties.getProperty(ENTRY_HOST);
		port = properties.getProperty(ENTRY_PORT);
		dbName = properties.getProperty(ENTRY_DB_NAME);
		username = properties.getProperty(ENTRY_USERNAME);
		password = properties.getProperty(ENTRY_PASSWORD);
	}

	public String getDriver()
	{
		return driver;
	}

	public String getHost()
	{
		return host;
	}

	public String getPort()
	{
		return port;
	}

	public String getDbName()
	{
		return dbName;
	}

	public String getUsername()
	{
		return username;
	}

	public String getPassword()
	{
		return password;
	}

}
